{% extends "base.html" %}
{% load photologue_extras  %}

{% block title %}Latest Photo Galleries{% endblock %}



<h1>Latest Photo Galleries</h1>
{% block recent %}
    <div class="round-border-topright"></div>
    <h1 class="first">Galeries recents</h1>
    {% get_latest_galleries as galleries %}
    <dl class="nav3-grid">
        {% for gallery in galleries %}
        <dt>
            <a href="{{ gallery.get_absolute_url }}">{{gallery.title}}</a>
        </dt>
        {% endfor %}
    </dl>
{% endblock recent %}

{% block content %}
<div class="column1-unit">
{% if latest %}
    {% for gallery in latest %}        
        {% for photo in gallery.photos.all %}
            <h1 class="side">
                <a href="{{ photo.get_absolute_url }}"><img src="{{ photo.get_thumbnail_url }}" alt="{{ photo.title }}"/></a>
                {{ gallery.title }}
            </h1>
            <h3 class="side">{{ gallery.pub_date}}</h3>
            <p>{{gallery.description}}</p>
        {% endfor %}
    {% endfor %}
{% else %}
    <p>No galleries were found.</p>
{% endif %}
<p><a href="{% url pl-gallery-list 1 %}">Veure totes les galeries</a></p>
</div>
{% endblock %}
